package com.llb666.shop.order.infrastructure.conver;

import com.llb666.shop.order.domain.entity.Orders;
import com.llb666.shop.order.infrastructure.po.OrdersPo;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 订单对象转换器.
 *
 * @author llb666
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface OrderCvt {
    OrderCvt INSTANCE = Mappers.getMapper(OrderCvt.class);

    OrdersPo do2po(Orders orders);

    Orders po2do(OrdersPo ordersPo);

    List<Orders> po2doList(List<OrdersPo> ordersPos);
}
